#!/usr/bin/php
<?php
require_once dirname(__FILE__) . '/simple_helpers.inc';

$str = "aaaaaaaaaaaaa";

$ss = new LuminousStringSearch($str);

$i=0;
$pass = true;
while ($i<strlen($str))
{
  $x = $ss->PregSearch('/a+/', $i, $m);
  if ($x !== $i)
    $pass = false; 
  $i++;
}

exit((int)!$pass);
